package com.eight.cloud.mybatisplus.method.injector;

import com.baomidou.mybatisplus.core.injector.AbstractMethod;
import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector;
import com.baomidou.mybatisplus.core.metadata.TableInfo;
import com.eight.cloud.mybatisplus.method.*;
import com.eight.cloud.mybatisplus.method.*;
import org.apache.ibatis.session.Configuration;

import java.util.List;

/**
 * 自定义方法注入器
 *
 * @ClassName: MpSqlInjector
 * @Author: TXC
 * @Date: 2024-12-18 17:31
 **/
public class MpSqlInjector extends DefaultSqlInjector {
    @Override
    public List<AbstractMethod> getMethodList(Configuration configuration, Class<?> mapperClass, TableInfo tableInfo) {
        List<AbstractMethod> methodList = super.getMethodList(configuration, mapperClass, tableInfo);
        //增加自定义的SelectRealById方法
        methodList.add(new SelectRealById());
        methodList.add(new SelectRealBatchByIds());
        methodList.add(new SelectRealList());
        methodList.add(new RealDelete());
        methodList.add(new RealDeleteById());
        return methodList;
    }

}
